bitkeeper revision 1.1159.1.423 (419a4b1eF-m6DjqBFFvhQQg8V-VsqQ)
authorcl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Tue, 16 Nov 2004 18:46:54 +0000 (18:46 +0000)
committercl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Tue, 16 Nov 2004 18:46:54 +0000 (18:46 +0000)
Initialize trap tables on additional cpus.

linux-2.6.9-xen-sparse/arch/xen/i386/kernel/smpboot.c
linux-2.6.9-xen-sparse/arch/xen/i386/kernel/traps.c

index 2c26fdb5b7dc1cfe8aaf83a8e97620e89103b4c5..e05db2c386f2cf29715a71206925a9bb7ce57768 100644 (file)
@@ -835,6 +835,7 @@ static int __init do_boot_cpu(int apicid)
        extern void startup_32_smp(void);
        extern void hypervisor_callback(void);
        extern void failsafe_callback(void);
+       extern int smp_trap_init(trap_info_t *);
        int i;
 
        cpu = ++cpucount;
@@ -894,7 +895,7 @@ static int __init do_boot_cpu(int apicid)
                ctxt.trap_ctxt[i].vector = i;
                ctxt.trap_ctxt[i].cs     = FLAT_GUESTOS_CS;
        }
-       ctxt.fast_trap_idx = 0;
+       ctxt.fast_trap_idx = smp_trap_init(ctxt.trap_ctxt);
 
        /* No LDT. */
        ctxt.ldt_ents = 0;
index dd1c42b8400a1acb7e32927e58505dc6e96fbd6a..c59d6bfe7c5b71673b35390bb80c2933719ec6ea 100644 (file)
@@ -1073,6 +1073,18 @@ void __init trap_init(void)
        cpu_init();
 }
 
+int smp_trap_init(trap_info_t *trap_ctxt)
+{
+       trap_info_t *t = trap_table;
+
+       for (t = trap_table; t->address; t++) {
+               trap_ctxt[t->vector].flags = t->flags;
+               trap_ctxt[t->vector].cs = t->cs;
+               trap_ctxt[t->vector].address = t->address;
+       }
+       return SYSCALL_VECTOR;
+}
+
 
 /*
  * install_safe_pf_handler / install_normal_pf_handler: